/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package fr.monVehicule.presentation.ajouter.action;

import com.opensymphony.xwork2.ActionSupport;
import fr.monVehicule.coordination.ajouter.vehicule.ChercherModelesProcessus;
import fr.monVehicule.entite.Marque;
import fr.monVehicule.entite.Modele;
import java.util.List;

/**
 *
 * @author David
 */
public class ChercherModelesAction extends ActionSupport {
    private static final long serialVersionUID = -6765991741441442190L;
    private Integer marque;
    private List<Modele> listModele;
    
    /**
     *
     * @return 
     */
    @Override
    public String execute() {
        
        ChercherModelesProcessus processus = new ChercherModelesProcessus(marque);
        
        processus.execute();
        listModele = processus.getList();
       
        return SUCCESS;
    }

//    public String getJSON() {
//        return execute();
//    }

    public List<Modele> getListModele() {
        return listModele;
    }

    public Integer getMarque() {
        return marque;
    }

    public void setMarque(Integer marque) {
        this.marque = marque;
    }

    
}
